/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.repository.organization;

import com.qinyetech.springstage.core.repository.BaseRepository;
import com.qinyeit.serviceapp.entity.PrintSettingOrder;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/** 
 * ClassName: PrintSettingOrderRepository <br/> 
 * Function: 单据打印设置 CRUD <br/> 
 * date: 2019-03-04 16:15:43 <br/> 
 * 
 * @author liuwenjin
 * @version 1.0
 * @since JDK 1.8
 */
public interface PrintSettingOrderRepository extends BaseRepository<PrintSettingOrder, Long> {


    @Transactional
    @Modifying
    @Query(value = "delete from print_setting_order_datas where merchant_group_id=?1 and print_type=?2",nativeQuery = true)
    void deletePringSettingOrderDatas(Long merchantGroupId,String printType);


    @Transactional
    @Modifying
    @Query(value = "delete from print_setting_order_details where merchant_group_id= ?1 and print_type= ?2",nativeQuery = true)
    void deletePringSettingOrderDetails(Long merchantGroupId,String printType);


    @Transactional
    @Modifying
    @Query(value = "delete from print_setting_orders where merchant_group_id=?1 and print_type=?2",nativeQuery = true)
    void deletePringSettingOrders(Long merchantGroupId,String printType);

    @Transactional
    @Modifying
    @Query(value = "delete from print_setting_order_table_datas where merchant_group_id=?1 and print_type=?2",nativeQuery = true)
    void deletePringSettingTableDatas(Long merchantGroupId,String printType);

}